package com.ruimei.service.impl;

import com.ruimei.entitys.Leave;
import com.ruimei.mapper.LeaveStatisticMapper;
import com.ruimei.service.LeaveStatisticSever;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class LeaveStatisticSeverImpl implements LeaveStatisticSever {

    @Resource
    LeaveStatisticMapper mapper;

    @Override
    public Map<String, Object> getStuLeaves(String classId, String leaveType, String beginTime, String endTime) {
        Map<String, Object> map = new HashMap();
        List<Leave> list = mapper.getStuLeaves(classId,leaveType,beginTime,endTime);
        map.put("data",list);
        map.put("status",true);
        map.put("message", "获取成功");

        return map;
    }
}
